package com.donger.business.cms.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * cms文章(CmsPost)表实体类
 *
 * @author somliy
 * @since 2020-05-07 19:06:17
 */
@Data
@TableName
public class CmsPost implements Serializable {

    private static final long serialVersionUID = -1; 
    
        
    /**id*/
    private Long id;
        
    /**标题*/
    private String title;
        
    /**状态 0草稿，1发布，2回收站*/
    private String status;
        
    /**地址*/
    private String url;
        
    /**概要*/
    private String summary;
        
    /**格式化后的文章*/
    private String formatContent;
        
    /**编辑时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date editTime;
        
    /**访问量*/
    private Long visits;
        
    /**描述*/
    private String metaDescription;
        
    /**是否允许评论 0允许评论*/
    private Boolean disallowComment;
        
    /**分类id*/
    private Long categoryId;
    /**分类名*/
    @TableField(exist = false)
    private String categoryName;
        
    /**创作者*/
    private Long userId;
    /**用户名*/
    @TableField(exist = false)
    private String userName;
}